package com.ate.adapters;

import android.graphics.Color;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.ate.javamvp.R;
import com.ate.bean.SelBean;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * @author Ate
 * @description:
 * @date :2020/12/22 9:13
 */
public class OnFragmentRecyAdp extends BaseQuickAdapter<SelBean, BaseViewHolder> {
    public OnFragmentRecyAdp(int layoutResId, @Nullable List<SelBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, SelBean item) {
        TextView tv = helper.getView(R.id.onfrgament_tv);
        tv.setText(item.getName());

        if (item.isSelect()){
            tv.setTextSize(22);
            tv.setTextColor(Color.RED);
        }else {
            tv.setTextColor(Color.BLACK);
            tv.setTextSize(18);
        }


    }
}
